

def initialChoice():
    print ("Would you like to find the interest, or the total amount you will \
recieve? Please type either 'interest' or 'amount'")
    choice = input()
    if choice == 'interest':
        findInterest()
    elif choice == 'amount':
        findAmount()
    else:
        print ("command not recognized. Please enter a valid command.")
        initialChoice()

def findAmount():
    print ("What is the rate?")
    r = float(input())
    print ("What is the principal amount?")
    p = input()
    print ("What is the term?")
    t = input()
    r = r/100
    a = (int(p) + (int(p)*(float(r)*int(t))))
    print ("$",a, "is the total amount")

def findInterest():
    print ("What is the rate?")
    r = float(input())
    print ("What is the principal amount?")
    p = input()
    print ("What is the term?")
    t = input()
    r = r/100
    i = (int(p)*float(r)*int(t))
    print ("$",i, "is the interest earned")
    

initialChoice()
